<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改支付请求记录')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-payrecord-edit" th:object="${bizPayRecord}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">请求地址：</label>
                <div class="col-sm-8">
                    <input name="reqUrl" th:field="*{reqUrl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">订单号：</label>
                <div class="col-sm-8">
                    <input name="orderNo" th:field="*{orderNo}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付ID：</label>
                <div class="col-sm-8">
                    <input name="payId" th:field="*{payId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">支付订单号：</label>
                <div class="col-sm-8">
                    <input name="payOrderNo" th:field="*{payOrderNo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">金额：</label>
                <div class="col-sm-8">
                    <input name="amount" th:field="*{amount}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">请求参数：</label>
                <div class="col-sm-8">
                    <textarea name="param" class="form-control">[[*{param}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">接口类型：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('tranType')}">
                        <input type="radio" th:id="${'itfType_' + dict.dictCode}" name="itfType" th:value="${dict.dictValue}" th:field="*{itfType}">
                        <label th:for="${'itfType_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">响应状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('adapayPayStatus')}">
                        <input type="radio" th:id="${'resStatus_' + dict.dictCode}" name="resStatus" th:value="${dict.dictValue}" th:field="*{resStatus}">
                        <label th:for="${'resStatus_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">响应内容：</label>
                <div class="col-sm-8">
                    <textarea name="resData" class="form-control">[[*{resData}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">订单提交时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="referTime" th:value="${#dates.format(bizPayRecord.referTime, 'yyyy-mm-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-mm-dd HH:mm:ss" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "biz/payrecord";
        $("#form-payrecord-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-payrecord-edit').serialize());
            }
        }

        $("input[name='referTime']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "1",
            autoclose: true
            // format: "yyyy-mm-dd",
            // minView: "month",
            // autoclose: true
        });
    </script>
</body>
</html>